Android invalidation client changes * Removing deprecated proto field * Handling null intents and requesting redelivery git-svn-id: http://google-cache-invalidation-api.googlecode.com/svn/trunk@303 1cc9d426-c294-39be-ba72-c0199ca0f247
diff --git a/src/java/com/google/ipc/invalidation/common/BuildConstants.java b/src/java/com/google/ipc/invalidation/common/BuildConstants.java index 8a61dd7..a94d057 100644 --- a/src/java/com/google/ipc/invalidation/common/BuildConstants.java +++ b/src/java/com/google/ipc/invalidation/common/BuildConstants.java
@@ -33,5 +33,5 @@ /** Build constant definitions. */ class BuildConstants { - static final int BUILD_DATESTAMP = 20130415; + static final int BUILD_DATESTAMP = 20130429; } diff --git a/src/java/com/google/ipc/invalidation/external/client/contrib/MultiplexingGcmListener.java b/src/java/com/google/ipc/invalidation/external/client/contrib/MultiplexingGcmListener.java index f0a99c3..927ea59 100644 --- a/src/java/com/google/ipc/invalidation/external/client/contrib/MultiplexingGcmListener.java +++ b/src/java/com/google/ipc/invalidation/external/client/contrib/MultiplexingGcmListener.java
@@ -179,10 +179,18 @@ protected AbstractListener(String name) { super(name); + + // If the process dies during a call to onHandleIntent, redeliver the intent when the service + // restarts. + setIntentRedelivery(true); } @Override public final void onHandleIntent(Intent intent) { + if (intent == null) { + return; + } + // This method is final to prevent subclasses from overriding it and introducing errors in // the wakelock protocol. try { diff --git a/src/java/com/google/ipc/invalidation/ticl/android2/TiclService.java b/src/java/com/google/ipc/invalidation/ticl/android2/TiclService.java index 53403e3..d81cac9 100644 --- a/src/java/com/google/ipc/invalidation/ticl/android2/TiclService.java +++ b/src/java/com/google/ipc/invalidation/ticl/android2/TiclService.java
@@ -67,6 +67,10 @@ public TiclService() { super("TiclService"); + + // If the process dies during a call to onHandleIntent, redeliver the intent when the service + // restarts. + setIntentRedelivery(true); } /** diff --git a/src/proto/android_channel.proto b/src/proto/android_channel.proto index 9309416..9ff9f32 100644 --- a/src/proto/android_channel.proto +++ b/src/proto/android_channel.proto
@@ -59,12 +59,7 @@ // An id that specifies how to route a message to a Ticl on an Android device // via C2DM. message EndpointId { - - // The version of this message. - // Obsolete: no longer set after the INITIAL version of the channel - // TODO: Remove with placeholder comment once - // unversioned clients are no longer supported - optional ProtocolVersion protocol_version = 1; + // Field 1 was once the ProtocolVersion of this message. // The "registration_id" returned when the client registers with c2dm. This // id is required by c2dm in order to send a message to the device.